<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/5/18
 * Time: 15:21
 */

namespace App\Models;


use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class DriverFinancial extends Model
{
   protected $table = 'driver_financial';

    /**
     * 关联公司
     */
   function company()
   {
       return  $this->hasOne(Company::class,'id','company_id');
   }

    /**
     * 业务类型
     */
   function service()
   {
       return $this->hasOne(Service::class,'id','service_id');
   }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     * 用户信息
     */
   function user()
   {
       return $this->hasOne(User::class,'id','user_id');
   }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     * 车辆信息
     */
   function car()
   {
       return $this->hasOne(Car::class,'id','car_id');
   }
}
